<?php
/**
 * Created by PhpStorm.
 */

use Biz\model\GoodsBasicInfo as mGoodsBasicInfo;
use Biz\service\activity\Coupon as sCoupon;

/**
 * @deprecated
 */
class GoodsTipsAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_VISITOR;
    const ACTION_TYPE = "coupon";
    const VERSION_METHOD = true;


    public function main()
    {
        $goodsId = $this->getRequest()->getQuery('goods_id', 0);

        $goodsInfo =mGoodsBasicInfo::getInfo($goodsId,['shop_id']);

        $result = sCoupon::getGoodsTips($this->uid, $goodsId,$goodsInfo['shop_id']);

        $this->setSuccess(['list' => $result]);
    }

    public function main_V3_5_2(){

        $goodsId = $this->getRequest()->getQuery('goods_id', 0);

        $result = sCoupon::getGoodsTips($this->uid, $goodsId);

        $this->setSuccess(['list' => $result]);
    }

}
